package com.lijing.graph;

import java.util.Stack;

/**
 * @Description TODO
 * @title: GraphDemo
 * @Author LiJing
 * @Date: 2021/3/311:06 下午
 * @Version 1.0
 */
public class GraphDemo {

    public static void main(String[] args) {
        Graph graph = new Graph(5);
        graph.insertVertex("A");
        graph.insertVertex("B");
        graph.insertVertex("C");
        graph.insertVertex("D");
        graph.insertVertex("E");

        graph.insertEdge(0,1,1);
        graph.insertEdge(0,2,1);
        graph.insertEdge(1,2,1);
        graph.insertEdge(1,3,1);
        graph.insertEdge(1,4,1);

        graph.bfs();
    }
}
